//package com.yiwei.hdb.impl;
//
//import android.content.Context;
//import android.text.TextUtils;
//
//import com.yiwei.hdb.constant.Const;
//import com.yiwei.hdb.http.CallBackListener;
//import com.yiwei.hdb.http.InterfaceServer;
//import com.yiwei.hdb.interfaces.ContractInfo;
//import com.yiwei.hdb.http.InfoCallBack;
//import com.yiwei.hdb.http.ResponseListener;
//import com.yiwei.hdb.model.ContractModel;
//import com.yiwei.hdb.model.RequestModel;
//import com.yiwei.hdb.model.ResponseModel;
//import com.yiwei.hdb.util.JsonUtil;
//
//import java.util.HashMap;
//
///**
// * 协议
// */
//public class ContractInfoImpl implements ContractInfo {
//
//    @Override
//    public void getContractInfo(Context mContext, int id, String type_id, String deal_id, final InfoCallBack callBack) {
//        HashMap localHashMap = new HashMap();
//        if (!TextUtils.isEmpty(deal_id)) {
//            localHashMap.put("deal_id", deal_id);
//        } else {
//            localHashMap.put("id", id);
//            localHashMap.put("type_id", type_id);
//        }
//        RequestModel model = new RequestModel(localHashMap);
//
//        InterfaceServer.getInstance(mContext.getApplicationContext()).requestInterface(Const.CONTRACT, Const.RequestMethod.POST, model, Const.DEFAULT_TIMEOUT, new CallBackListener<ContractModel>(ContractModel.class,callBack));
////                new ResponseListener() {
////            public void onFinishInMainThread(Object paramAnonymousObject) {
////            }
////
////            public void onStartInMainThread(Object paramAnonymousObject) {
////                callBack.onFailure(paramAnonymousObject.toString());
////            }
////
////            @Override
////            public void onSuccessInMainThread(int paramAnonymousInt, String paramAnonymousString, Object result) {
////                try {
////                    ContractModel model = (ContractModel) result;
////                    if (model.getStatus() == 1)
////                        callBack.onSuccess(model);
////                    else callBack.onFailure(model.getMsg());
////                    //返回数据接口
////                } catch (Exception e) {
////                    e.printStackTrace();
////                }
////            }
////
////            @Override
////            public Object onSuccessInRequestThread(int statusCode, String content) {
////                try {
////                    return JsonUtil.<ContractModel>fromJson(content, ContractModel.class);
////                } catch (Exception e) {
////                    return null;
////                }
////            }
////        });
//    }
//}
